gtk4.git
7 years agoUse g_clear_pointer to unparent widgets
Timm Bäder [Tue, 13 Nov 2018 19:53:14 +0000 (20:53 +0100)]
Use g_clear_pointer to unparent widgets

7 years agowidget: Don't pass a position to ->size_allocate
Timm Bäder [Thu, 16 Aug 2018 04:53:03 +0000 (06:53 +0200)]
widget: Don't pass a position to ->size_allocate

The values have been 0/0 for a long time now, so just drop the
GtkAllocation argument and replace it with width and height.

7 years agodocs: Add GtkEventControllerLegacy
Timm Bäder [Tue, 13 Nov 2018 14:33:31 +0000 (15:33 +0100)]
docs: Add GtkEventControllerLegacy

7 years agovulkancontext: Add missing error switch
Timm Bäder [Tue, 13 Nov 2018 14:28:28 +0000 (15:28 +0100)]
vulkancontext: Add missing error switch

7 years agoappchooserbutton: Remove priv pointer
Timm Bäder [Tue, 13 Nov 2018 14:14:10 +0000 (15:14 +0100)]
appchooserbutton: Remove priv pointer

7 years agotestappchooserbutton: Fix for class hierarchy change
Timm Bäder [Tue, 13 Nov 2018 14:13:47 +0000 (15:13 +0100)]
testappchooserbutton: Fix for class hierarchy change

7 years agoappchooserbutton: Inherit from GtkWidget
Timm Bäder [Tue, 13 Nov 2018 14:01:21 +0000 (15:01 +0100)]
appchooserbutton: Inherit from GtkWidget

7 years agorender: Fix a position/size mixup
Timm Bäder [Tue, 13 Nov 2018 13:08:32 +0000 (14:08 +0100)]
render: Fix a position/size mixup

Fixes the foreigndrawing demo.

7 years agotoolbar: Remove dead code
Timm Bäder [Tue, 13 Nov 2018 04:09:35 +0000 (05:09 +0100)]
toolbar: Remove dead code

The size definitely changes, otherwise ->size_allocate does not get
called.

7 years agotoolbar: Remove some unused defines
Timm Bäder [Tue, 13 Nov 2018 04:09:24 +0000 (05:09 +0100)]
toolbar: Remove some unused defines

7 years agowayland: Adapt to settings portal api change
Matthias Clasen [Mon, 12 Nov 2018 18:51:56 +0000 (13:51 -0500)]
wayland: Adapt to settings portal api change

ReadAll now accepts an array of patterns.

7 years agoMerge branch 'scroll-event-propagation' into 'master'
Carlos Garnacho [Mon, 12 Nov 2018 10:05:46 +0000 (10:05 +0000)]
Merge branch 'scroll-event-propagation' into 'master'

eventcontrollerscroll: Conditionally propagate ::scroll

Closes #45

See merge request GNOME/gtk!250

7 years agoeventcontrollerscroll: Conditionally propagate ::scroll
Ernestas Kulik [Wed, 18 Jul 2018 13:34:39 +0000 (16:34 +0300)]
eventcontrollerscroll: Conditionally propagate ::scroll

Currently, gtk_event_controller_scroll_handle_event() always returns
TRUE if it is handled, which stops the propagation of the event. If
there’s a single GtkEventControllerScroll in the widget hierarchy, that
means that no others will run, depending on the propagation phase. In
Nautilus, this can be observed when adding a scroll controller to the
GtkScrolledWindow (ctrl-scrolling controls the zoom level) - either the
scrolling or the zooming breaks.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/45

7 years agocalendar: Remove unused struct member
Timm Bäder [Fri, 9 Nov 2018 19:18:13 +0000 (20:18 +0100)]
calendar: Remove unused struct member

7 years agoscrolledwindow: Remove some useless code
Timm Bäder [Fri, 9 Nov 2018 18:37:55 +0000 (19:37 +0100)]
scrolledwindow: Remove some useless code

This is all being done already be the add_class/remove_class calls
before.

7 years agoscale: Don't set label css name to "label"
Timm Bäder [Fri, 9 Nov 2018 17:59:30 +0000 (18:59 +0100)]
scale: Don't set label css name to "label"

That's already the css name of all labels.

7 years agocolorscale: Remove x/y arguments from snapshot_scale
Timm Bäder [Fri, 9 Nov 2018 17:01:26 +0000 (18:01 +0100)]
colorscale: Remove x/y arguments from snapshot_scale

We only pass 0 anyway.

7 years agoAdwaita: use HIG grey for bg_color
Jakub Steiner [Fri, 9 Nov 2018 14:37:08 +0000 (15:37 +0100)]
Adwaita: use HIG grey for bg_color

- refresh with a light bg color, use the new color palette

7 years agoAdwaita: fix osd bg color
Jakub Steiner [Fri, 9 Nov 2018 10:19:41 +0000 (11:19 +0100)]
Adwaita: fix osd bg color

- don't try deriving from bg_color, osd should be consistent
  for light & dark.

FIxes issue #1449

7 years agoAdwaita: Propagate bg color to titlebar separator descendants
Adrien Plazas [Tue, 24 Jul 2018 12:37:57 +0000 (14:37 +0200)]
Adwaita: Propagate bg color to titlebar separator descendants

Gives the same background color to all separators descending from a
title bar than to its direct childrens.

This prevents separators which are in a titlebar but not direct children
from the widget with the titlebar style class from being almost
transparent and hence it prevent them from revealing the clear color of
the window's titlebar (black).

https://gitlab.gnome.org/GNOME/gtk/issues/1231

7 years agoMerge branch 'wip/jimmac/insensitive-progress' into 'master'
Jakub Steiner [Fri, 9 Nov 2018 07:27:49 +0000 (07:27 +0000)]
Merge branch 'wip/jimmac/insensitive-progress' into 'master'

Adwaita: draw insensitive progressbars

See merge request GNOME/gtk!360

7 years agoMerge branch 'wip/jimmac/hig-colors-gtk4' into 'master'
Jakub Steiner [Fri, 9 Nov 2018 07:25:05 +0000 (07:25 +0000)]
Merge branch 'wip/jimmac/hig-colors-gtk4' into 'master'

Adwaita: use new HIG colors

See merge request GNOME/gtk!407

7 years agoAdwaita: use new HIG colors
Jakub Steiner [Mon, 5 Nov 2018 15:10:50 +0000 (16:10 +0100)]
Adwaita: use new HIG colors

- blue selection color, success & destructive colors updates
- blueish tint for dark

Addresses issue #1443

7 years agotestpopup: Fix GtkEventControllerMotion::motion callback signature
Timm Bäder [Thu, 8 Nov 2018 04:19:48 +0000 (05:19 +0100)]
testpopup: Fix GtkEventControllerMotion::motion callback signature

7 years agoeventcontrollerlegact: Fix ::event docs
Timm Bäder [Thu, 8 Nov 2018 04:19:30 +0000 (05:19 +0100)]
eventcontrollerlegact: Fix ::event docs

As discussed in !388.

7 years agoicontheme: Stop exporting gtk_icon_info_new_for_file
Timm Bäder [Tue, 30 Oct 2018 15:31:09 +0000 (16:31 +0100)]
icontheme: Stop exporting gtk_icon_info_new_for_file

7 years agoicontheme: Stop exporting gtk_icon_theme_color_symbolic_pixbuf
Timm Bäder [Tue, 30 Oct 2018 15:23:08 +0000 (16:23 +0100)]
icontheme: Stop exporting gtk_icon_theme_color_symbolic_pixbuf

7 years agoicontheme: Drop remaining emblem code
Timm Bäder [Tue, 30 Oct 2018 15:18:23 +0000 (16:18 +0100)]
icontheme: Drop remaining emblem code

7 years agoicontheme: Don't reference nonexistent parameter in docs
Timm Bäder [Mon, 29 Oct 2018 10:27:04 +0000 (11:27 +0100)]
icontheme: Don't reference nonexistent parameter in docs

7 years agoicontheme: Use a bit field in AsyncSymbolicData
Timm Bäder [Mon, 29 Oct 2018 10:26:05 +0000 (11:26 +0100)]
icontheme: Use a bit field in AsyncSymbolicData

176 -> 144 bytes

7 years agoicontheme: Stop strdup'ing css colors when loading
Timm Bäder [Mon, 29 Oct 2018 10:10:42 +0000 (11:10 +0100)]
icontheme: Stop strdup'ing css colors when loading

... symbolic icons.

7 years agogl renderer: Properly retrieve matrix scale
Timm Bäder [Sun, 12 Aug 2018 15:42:58 +0000 (17:42 +0200)]
gl renderer: Properly retrieve matrix scale

So rotating offscreen nodes works.

7 years agowidget: Avoid some more ->priv accesses
Timm Bäder [Thu, 18 Oct 2018 10:00:47 +0000 (12:00 +0200)]
widget: Avoid some more ->priv accesses

7 years agorange: Remove multipress_gesture member
Timm Bäder [Thu, 18 Oct 2018 08:53:32 +0000 (10:53 +0200)]
range: Remove multipress_gesture member

We don't need it in the instance struct since we only set it up and then
access it in its signal callbacks.

7 years agowidget: Some whitespace fixes
Timm Bäder [Wed, 17 Oct 2018 18:15:34 +0000 (20:15 +0200)]
widget: Some whitespace fixes

7 years agoPopover: Minimally document the ::closed signal
Daniel Boles [Mon, 5 Nov 2018 23:36:54 +0000 (23:36 +0000)]
Popover: Minimally document the ::closed signal

This is better than nothing at all. The wording is taken from Carlos's
commit message when he added this shortly before 3.12 (but skip Since).
Skip the bit from his commit message explaining what this replaced; we
don't need to say all the less good things our convenience API replaces.

7 years agotesttreelistmodel: Don't use non-standard function
Daniel Boles [Wed, 24 Oct 2018 18:48:45 +0000 (19:48 +0100)]
testtreelistmodel: Don't use non-standard function

as per efd3758f6a779041ff552cb4c5163446fd951368 strcasecmp() is not a C
standard thing (not that we bothered including any header for it anyway)
and so this test failed to build on Windows with Microsoft Visual C.

7 years agoTreeMenu: Don't manually reinvent g_list_index()
Daniel Boles [Sat, 20 Oct 2018 14:19:11 +0000 (15:19 +0100)]
TreeMenu: Don't manually reinvent g_list_index()

g_list_index() "Gets the position of the element containing the given
data (starting from 0)." That is exactly what we were manually doing.

7 years agoMerge branch 'wip/3v1n0/recent-info-cleanup' into 'master'
Timm Bäder [Tue, 6 Nov 2018 09:52:11 +0000 (09:52 +0000)]
Merge branch 'wip/3v1n0/recent-info-cleanup' into 'master'

gtk-autocleanups: add cleanup function for GtkRecentInfo

See merge request GNOME/gtk!409

7 years agowayland: Fix a thinko in settings portal support
Matthias Clasen [Mon, 5 Nov 2018 23:12:40 +0000 (18:12 -0500)]
wayland: Fix a thinko in settings portal support

When we decide to fall back because the settings portal
is not present, adhere to that decision elsewhere. And
treat the fontconfig-timestamp like the other special-cased
settings, with G_TYPE_NONE.

7 years agogtk-autocleanups: add cleanup function for GtkRecentInfo
Marco Trevisan [Mon, 5 Nov 2018 21:37:42 +0000 (21:37 +0000)]
gtk-autocleanups: add cleanup function for GtkRecentInfo

7 years agoMerge branch 'wip/settings-portal' into 'master'
Matthias Clasen [Sun, 4 Nov 2018 20:57:26 +0000 (20:57 +0000)]
Merge branch 'wip/settings-portal' into 'master'

settings portal

See merge request GNOME/gtk!403

7 years agowayland: Support the settings portal
Matthias Clasen [Thu, 1 Nov 2018 23:47:46 +0000 (19:47 -0400)]
wayland: Support the settings portal

Under Wayland, we are currently directly using GSettings
for desktop settings. But in a sandbox, we may not have
access to dconf, so this may fail. Use the new settings
portal instead.

7 years agoMove the should_use_portal helper to gdk
Matthias Clasen [Thu, 1 Nov 2018 17:46:04 +0000 (13:46 -0400)]
Move the should_use_portal helper to gdk

We want to use it there too, in the future.
Update all callers.

7 years agoUse a simpler sandbox check
Matthias Clasen [Thu, 1 Nov 2018 17:31:10 +0000 (13:31 -0400)]
Use a simpler sandbox check

No need to use the runtime dir and allocate a string.
We can just check in /.

7 years agoMerge branch 'wip/fmuellner/deco-setting' into 'master'
Matthias Clasen [Fri, 2 Nov 2018 16:18:25 +0000 (16:18 +0000)]
Merge branch 'wip/fmuellner/deco-setting' into 'master'

wayland: Remove GNOME Classic-specific workaround

See merge request GNOME/gtk!400

7 years agowayland: Remove GNOME Classic-specific workaround
Florian Müllner [Fri, 2 Nov 2018 15:04:56 +0000 (16:04 +0100)]
wayland: Remove GNOME Classic-specific workaround

As GSettings now supports session-specific defaults, GNOME Classic
no longer uses a separate schema and the decoration layout is always
determined by the regular schema.

This essentially reverts commit add67b516cb6 (although the code was
moved since then).

https://gitlab.gnome.org/GNOME/gtk/merge_requests/400

7 years agoGdkQuartz: Handle NULL from [NSGraphicsContext currentContext].
John Ralls [Sat, 20 Oct 2018 19:27:46 +0000 (12:27 -0700)]
GdkQuartz: Handle NULL from [NSGraphicsContext currentContext].

By returning a default surface. The situation where there's no
currentContext arises when GtkCSS is trying to determine the
layout sizes so no actual display is necessary.

Closes: #1411
7 years agoUse [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite.
John Ralls [Mon, 15 Oct 2018 17:45:57 +0000 (10:45 -0700)]
Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite.

7 years agoUpdate GDK_OSX versions to current MacOS release.
John Ralls [Mon, 15 Oct 2018 17:41:15 +0000 (10:41 -0700)]
Update GDK_OSX versions to current MacOS release.

7 years agoUpdate POTFILES.in
Piotr Drąg [Wed, 31 Oct 2018 17:46:48 +0000 (18:46 +0100)]
Update POTFILES.in

7 years agoMerge branch 'wip/carlosg/public-legacy-controller' into 'master'
Timm Bäder [Wed, 31 Oct 2018 13:39:08 +0000 (13:39 +0000)]
Merge branch 'wip/carlosg/public-legacy-controller' into 'master'

Make legacy controller public

See merge request GNOME/gtk!388

7 years agoMerge branch '1422-gtkentry-s-minimum-width-is-hardcoded-to-150px-GTK4' into 'master'
Timm Bäder [Fri, 26 Oct 2018 09:25:36 +0000 (09:25 +0000)]
Merge branch '1422-gtkentry-s-minimum-width-is-hardcoded-to-150px-GTK4' into 'master'

gtkentry: set minimum-width to 0 instead of 150

Closes #1422 and evince#1002

See merge request GNOME/gtk!393

7 years agoUpdated Slovenian translation
Matej Urbančič [Thu, 25 Oct 2018 20:06:19 +0000 (22:06 +0200)]
Updated Slovenian translation

7 years agoAdded Slovenian translation
Matej Urbančič [Thu, 25 Oct 2018 20:03:51 +0000 (22:03 +0200)]
Added Slovenian translation

7 years agogtkentry: set minimum-width to 0 instead of 150
Nelson Benítez León [Sun, 21 Oct 2018 12:07:36 +0000 (17:07 +0500)]
gtkentry: set minimum-width to 0 instead of 150

and use 150 as natural-width.

Currently there's no way for a GtkEntry to be less
than 150px wide (apart from using "width-chars" property),
this is too much for a default minimum-width, an app
developer may need to have a shorter GtkEntry, for example
when the UI it's been shrunk by the user (see [1]) or when
you want to match the size of another widget (which is less
than 150px) see [2] for Evince bug on using
gtk_combo_box_new_with_model_and_entry() for PDF forms where
GtkEntry of ComboBox is too wide and doesn't match the combo
list width.

Using "width-chars" property may be a workaround to obtain
a short minimum-width for the entry, but is not a proper
solution for the mentioned cases as you may not know how
short your GtkEntry will be, or the fact that using "chars"
as a width unit is not pixel accurate.

Curious note: the commit that introduced the GtkEntry
minimum-width to be 150px is from 20 years ago, see
https://bit.ly/2ySEfK4

[1] This change was already suggested by Benjamin Otte
in a blog comment https://bit.ly/2J96wRo

[2] Fixes issue evince#1002

7 years agoMerge branch 'nirbheek/meson-fallback-dep-fixes' into 'master'
Timm Bäder [Wed, 24 Oct 2018 09:42:12 +0000 (09:42 +0000)]
Merge branch 'nirbheek/meson-fallback-dep-fixes' into 'master'

Misc meson fixes for using subproject dependencies

See merge request GNOME/gtk!232

7 years agoUpdate Esperanto translation
Kristjan SCHMIDT [Wed, 24 Oct 2018 08:14:41 +0000 (08:14 +0000)]
Update Esperanto translation

7 years agoAdwaita: prevent devel styling break selection mode
Jakub Steiner [Mon, 22 Oct 2018 08:31:20 +0000 (10:31 +0200)]
Adwaita: prevent devel styling break selection mode

- Selection mode does not get the special devel styling.

- removed teh last-child() selector for it doesn't work anymore.
  Better style all section of the headerbar than none. Proper fix pending.

https://source.puri.sm/Librem5/libhandy/issues/57

7 years agoquartz: do not cache the screen in the gdkmonitor
Ignacio Casal Quinteiro [Sun, 7 Oct 2018 19:51:35 +0000 (21:51 +0200)]
quartz: do not cache the screen in the gdkmonitor

Instead we just cache the monitor number and get
out of it the nsscreen when it is needed. This is
a requirement since it nsscreen it is not supposed
to be cached.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1312
7 years agoMerge branch '1397-gtknotebook-built-in-popup-menu-listing-tabs-doesn-t-use-tab-label...
Matthias Clasen [Tue, 16 Oct 2018 20:49:42 +0000 (20:49 +0000)]
Merge branch '1397-gtknotebook-built-in-popup-menu-listing-tabs-doesn-t-use-tab-label-text-for-the-last-tab-4' into 'master'

Notebook: Ensure menu label updates with tab_label

Closes #1397

See merge request GNOME/gtk!386

7 years agoMerge branch 'lrn/zorder-gtk4' into 'master'
LRN [Mon, 15 Oct 2018 22:48:14 +0000 (22:48 +0000)]
Merge branch 'lrn/zorder-gtk4' into 'master'

Don't let the OS maintain relative Z-order for windows (GTK4)

See merge request GNOME/gtk!197

7 years agotests: Drop "saved positions" test in testgtk
Carlos Garnacho [Mon, 15 Oct 2018 15:31:48 +0000 (17:31 +0200)]
tests: Drop "saved positions" test in testgtk

This test solely relies on configure events, which aren't supported anymore.

7 years agotests: Drop ::event handler in testgtk
Carlos Garnacho [Mon, 15 Oct 2018 15:30:15 +0000 (17:30 +0200)]
tests: Drop ::event handler in testgtk

We can use ::size-allocate for it, as window positions in root coordinates
are neither supported nor crucial here.

7 years agotestsuite: Fix gestures tests for the legacy controller
Carlos Garnacho [Mon, 15 Oct 2018 15:29:32 +0000 (17:29 +0200)]
testsuite: Fix gestures tests for the legacy controller

Let it create one with the right propagation phase, so the event propagation
chain stays the same.

7 years agotests: Use GtkEventControllerMotion in testpopup
Carlos Garnacho [Fri, 12 Oct 2018 17:52:58 +0000 (19:52 +0200)]
tests: Use GtkEventControllerMotion in testpopup

Track motion through it, instead of a GtkWidget::event handler.

7 years agotests: Remove ::event handler in testwindowsize
Carlos Garnacho [Fri, 12 Oct 2018 17:45:30 +0000 (19:45 +0200)]
tests: Remove ::event handler in testwindowsize

We just want widget size here, not windowing configuration events.

7 years agogtkwidget: Drop obsolete code
Carlos Garnacho [Fri, 12 Oct 2018 17:45:00 +0000 (19:45 +0200)]
gtkwidget: Drop obsolete code

This path is not being hit anymore, gtkmain.c does handle those events
itself.

7 years agotestsuite: Fix gestures test
Carlos Garnacho [Fri, 12 Oct 2018 15:35:44 +0000 (17:35 +0200)]
testsuite: Fix gestures test

Was broken by the removal of the default GtkEventControllerLegacy.

7 years agogtkeventcontrollerlegacy: Make public
Carlos Garnacho [Fri, 12 Oct 2018 15:30:59 +0000 (17:30 +0200)]
gtkeventcontrollerlegacy: Make public

And move ::event into it, dropping the GtkWidget::event signal.

7 years agoNotebook: Ensure menu_label updates with tab_label
Daniel Boles [Fri, 12 Oct 2018 22:12:53 +0000 (23:12 +0100)]
Notebook: Ensure menu_label updates with tab_label

This was noticed in Firefox and demonstrated using a GtkBuilder ui file.
buildable_add_child() calls set_tab_label(), but the latter did nothing
to update the menu_label corresponding to that tab with the new text.
Using Builder to populate the tab child, only tabs other than last got
the right non-default labels, and even that was mostly coincidental, as
adding the main child called update_labels() via real_insert_page(), so
it took effect when the 2nd last main child is added, updating the rest
but leaving the last with the default label, not that given in Builder.

Fix by factoring out the code from child_reordered() to a new helper
menu_item_recreate() and calling that in set_tab_label(), so that
whenever the tab_label is updated, so is its corresponding menu_label.

This fixes the reported case and presumably others that we could write.

fixes https://gitlab.gnome.org/GNOME/gtk/issues/1397

7 years agoNotebook: Don't notify 2x from set_tab_label_text
Daniel Boles [Fri, 12 Oct 2018 22:40:16 +0000 (23:40 +0100)]
Notebook: Don't notify 2x from set_tab_label_text

It calls set_tab_label(), which already does that.

7 years agogtk-demo/main: Suppress implicit fallthru warning
Daniel Boles [Fri, 12 Oct 2018 21:09:42 +0000 (22:09 +0100)]
gtk-demo/main: Suppress implicit fallthru warning

Comments matched to reassure the compiler that fallthrough is
intentional are supposed to precede the case or default keywords, at
least in GCC, so the one here did not suppress the warning with GCC. We
can just the if condition and put the comment at the end to solve that.

https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/

7 years ago.gitignore: Ignore all subdirs in the subprojects dir
Nirbheek Chauhan [Fri, 12 Oct 2018 08:53:53 +0000 (14:23 +0530)]
.gitignore: Ignore all subdirs in the subprojects dir

7 years agomeson: Always fetch pangoft2_dep from the pango subproject
Nirbheek Chauhan [Mon, 23 Jul 2018 09:25:25 +0000 (14:55 +0530)]
meson: Always fetch pangoft2_dep from the pango subproject

This ensures that we will use pangoft2 if it is available, and not if
it is not available.

See: https://gitlab.gnome.org/GNOME/pango/merge_requests/6

7 years agomeson: Use proxy-libintl subproject when needed and available
Nirbheek Chauhan [Fri, 6 Jul 2018 18:50:41 +0000 (00:20 +0530)]
meson: Use proxy-libintl subproject when needed and available

Such as on Windows with MSVC.

7 years agomeson: Add a fallback for the harfbuzz dependency
Nirbheek Chauhan [Fri, 6 Jul 2018 18:49:57 +0000 (00:19 +0530)]
meson: Add a fallback for the harfbuzz dependency

This meson port is not upstream yet, so a wrap file is not included.
Upstream has expressed interest but the port hasn't been tested on all
platforms yet. Will be added when it gets upstreamed.

Link to WIP port: https://github.com/centricular/harfbuzz

7 years agoemojichooser: Pass chooser to add_emoji
Timm Bäder [Thu, 11 Oct 2018 10:27:17 +0000 (12:27 +0200)]
emojichooser: Pass chooser to add_emoji

7 years agowidget: Stop adding a legacy event controller
Timm Bäder [Mon, 8 Oct 2018 16:05:56 +0000 (18:05 +0200)]
widget: Stop adding a legacy event controller

The only event signal left is ::event and everything needing that
connects to it directly.

7 years agogl renderer: Save some matrix multiplications
Timm Bäder [Sat, 6 Oct 2018 07:23:26 +0000 (09:23 +0200)]
gl renderer: Save some matrix multiplications

We do this for every single node, which is a little costly, especially
since the common case for the modelview matrix these days is a simple
translation. So, check whether the new modelview matrix is only a
translation matrix and if so, don't do a full matrix multiplication per
node.

7 years agospinbutton: Don't use gfloat in a code sample
Timm Bäder [Wed, 26 Sep 2018 07:36:31 +0000 (09:36 +0200)]
spinbutton: Don't use gfloat in a code sample

7 years agoMerge branch 'file-sealing' into 'master'
Timm Bäder [Wed, 10 Oct 2018 11:12:03 +0000 (11:12 +0000)]
Merge branch 'file-sealing' into 'master'

gdk: seal in-memory files when possible

See merge request GNOME/gtk!353

7 years agoMerge branch 'gtkbuilder-tag-end-wrong-type' into 'master'
Timm Bäder [Wed, 10 Oct 2018 11:09:25 +0000 (11:09 +0000)]
Merge branch 'gtkbuilder-tag-end-wrong-type' into 'master'

GtkBuildable: Fix the type of the user_data in GtkBuildable.custom_tag_end

See merge request GNOME/gtk!378

7 years agogtkimcontextime.c: Fix Korean input
Chun-wei Fan [Tue, 9 Oct 2018 09:06:39 +0000 (17:06 +0800)]
gtkimcontextime.c: Fix Korean input

Commit 64a489ad inadvertently introduced a regression that broke Korean
text input because the changes there resulted that only the last input
string that we have from ImmGetCompositionStringW() for each time the
commit signal is emitted is kept, and also as a result the final Korean
character that is input by hitting space is also lost as a result, as we
didn't check for whether we are done with preediting.

Fix these issues by doing the following when we receive the
WM_IME_COMPOSITION message with GCS_RESULTSTR from Windows:
-Do not emit the commit signal during WM_IME_ENDCOMPOSITION, and...
-Emit the commit signal anyways, as we did before c255ba68, however...
-We still save up the string to commit, because we need to re-compute
 the cursor position when we do ->get_preedit_string(), which needs to
 take the GCS_RESULTSTR string we get from WM_IME_COMPOSITION into
 account as well, so that we avoid getting the Pango criticals that
 occur during Chinese (and most likely Japanese) input as the cursor
 position is out-of-range.

Fixes issue #1350.

7 years agotestsuite/gtk/filterlistmodel.c: Avoid GCCism
Chun-wei Fan [Tue, 9 Oct 2018 08:24:15 +0000 (16:24 +0800)]
testsuite/gtk/filterlistmodel.c: Avoid GCCism

Pointer arithmetic on gpointers (void *) is a GCCism, so avoid that by
being more explicit with things.

7 years agotestsuite/gtk/[flatten|sort]listmodel.c: Avoid VLA usage
Chun-wei Fan [Tue, 9 Oct 2018 08:22:28 +0000 (16:22 +0800)]
testsuite/gtk/[flatten|sort]listmodel.c: Avoid VLA usage

Visual Studio is unlikely to support VLAs at any point, so avoid using
them and use g_newa() instead.

7 years agoGtkBuildable: Fix the type of the user_data in GtkBuildable.custom_tag_end
Robert Ancell [Sun, 7 Oct 2018 22:34:43 +0000 (11:34 +1300)]
GtkBuildable: Fix the type of the user_data in GtkBuildable.custom_tag_end

The previous type was a pointer to a pointer, which seems to be a copy-paste
error from GtkBuildable.custom_tag_start which is an out parameter. It was
always cast in use so this is an API break, but not an ABI one.

7 years agoMerge branch 'master' into 'master'
Daniel Boles [Sun, 7 Oct 2018 17:28:31 +0000 (17:28 +0000)]
Merge branch 'master' into 'master'

gtkstack: fix null pointer dereference

See merge request GNOME/gtk!361

7 years agoUpdated Lithuanian translation
Aurimas Černius [Sun, 7 Oct 2018 13:57:01 +0000 (16:57 +0300)]
Updated Lithuanian translation

7 years agoMerge branch 'win32-runtime-immodule-swap-gtk4' into 'master'
LRN [Sun, 7 Oct 2018 09:05:16 +0000 (09:05 +0000)]
Merge branch 'win32-runtime-immodule-swap-gtk4' into 'master'

GDK W32: Support switching IM contexts at runtime (GTK4)

See merge request GNOME/gtk!372

7 years agodocs: Update GtkSliceListModel
Benjamin Otte [Sun, 7 Oct 2018 02:23:40 +0000 (02:23 +0000)]
docs: Update GtkSliceListModel

7 years agoslicelistmodel: Fix typos in docs
Mohammed Sadiq [Sun, 7 Oct 2018 02:16:58 +0000 (07:46 +0530)]
slicelistmodel: Fix typos in docs

7 years agoGDK W32: Support switching IM contexts at runtime
Руслан Ижбулатов [Tue, 2 Oct 2018 09:34:22 +0000 (09:34 +0000)]
GDK W32: Support switching IM contexts at runtime

This leverages the normal input context switching mechanism in GTK
by making it think that the gtk-im-module setting changed.
The backend returns gtk-im-module value as "ime" if W32
IME API says that an IME is in use. Otherwise it returns
and empty string - this still triggers an input context
switching code, which, not being able to create the desired context
(which is and empty string), falls back to looking at current
keyboard layout (currently that code is still a FIXME).

Paired with the code that signals gtk-im-module change on keyboard layout
switches, this is sufficient to make GTK capable of switching to
the appropriate IM context at runtime. At least, the kinds of context
that specify languages for which they are used automatically by default
(once locale matching is implemented), and the IME context.

Loading other kinds of IM context might still work via specifying
the gtk-im-module setting in gtk ini file, but doing so will likely
make GTK incapable of using the IME context that is used
for Korean, Chinese and Japanese (and some other languages).

Until someone figures out a way to actually change gtk-im-module
setting on Windows at runtime with meaningful values, the behaviour
introduced by this commit seems like a sufficient workaround.

7 years agoinspector: Highlight CSS node on selection
Benjamin Otte [Fri, 5 Oct 2018 20:07:07 +0000 (22:07 +0200)]
inspector: Highlight CSS node on selection

Fixes #1383

7 years agodocs: Put subsection into right section
Benjamin Otte [Thu, 20 Sep 2018 14:06:06 +0000 (16:06 +0200)]
docs: Put subsection into right section

The widget observer APIs belong into the widget docs, not the window
docs. Oops.

7 years agovideo: Add header include guard
Benjamin Otte [Fri, 21 Sep 2018 02:34:16 +0000 (04:34 +0200)]
video: Add header include guard

7 years agoAdwaita: fix devel styling for sidebar apps
Jakub Steiner [Thu, 4 Oct 2018 18:36:44 +0000 (20:36 +0200)]
Adwaita: fix devel styling for sidebar apps

- don't put the gradient/cogged wheel on apps that have a split headerbar
  due to having a sidebar

7 years agoUpdate Esperanto translation
Kristjan SCHMIDT [Sun, 30 Sep 2018 10:24:25 +0000 (10:24 +0000)]
Update Esperanto translation

7 years agogdk: seal in-memory files when possible
emersion [Sun, 23 Sep 2018 18:56:18 +0000 (20:56 +0200)]
gdk: seal in-memory files when possible

This can be used by compositors to mmap memory without having to
handle SIGBUS.

7 years agogtkstack: fix null pointer dereference
Hugo Lefeuvre [Wed, 26 Sep 2018 20:59:59 +0000 (16:59 -0400)]
gtkstack: fix null pointer dereference

The gtk_stack_snapshot_slide() function dereferences the
last_visible_child pointer without proper != NULL ckeck. This might
result in NULL pointer dereference and crash if last_visible_child is
invalid.

Add a != NULL check before dereferencing the pointer.